<?php
/**
 * Created by PhpStorm.
 * User: hualei
 * Date: 2015/5/31
 * Time: 10:44
 */
namespace app\modules\h5cargo\controllers;
use Yii;
use yii\web\Controller;

class LoginController extends Controller
{
    public $enableCsrfValidation = false;
    public $layout = 'stair_layout';

    function  __construct($id, $module, $config = []){
        if(isset($_COOKIE['id'])){
            $return_url = Yii::$app->getRequest()->url;
            $this->redirect('http://'.$_SERVER['HTTP_HOST'].$return_url);
        }
        parent::__construct($id, $module, $config = []);
    }
    //登录
    public function actionLogin()
    {
        return $this->render('login');
    }




}